﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Data;


namespace MyCombo
{
    public class MyComboBox : ComboBox
    {
        public MyComboBox()
            : base()
        {
            this.Font = new System.Drawing.Font("Times New Roman", 8);
        }
        
        
        Hashtable hst= new Hashtable();
        public void clear()
        {
            hst.Clear();
            this.Items.Clear();

        }
        public void Add_Multi(object gizli, object gorunen)
        {
            try
            {

                hst.Add(gorunen, gizli);
                this.Items.Add(gorunen);

            }
            catch (Exception)
            {
                MessageBox.Show( "("+this.Name+") Gizli Kayıt Hatası!..","Hata",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
        public int Get_Secilen_Gizliicerik()
        {
            try
            {
                int a = Convert.ToInt32(hst[this.Text]);
                return a;

            }
            catch (Exception)
            {

                return -1;
            }
        }

    }
}
